<?php
namespace app\index\validate;

use think\Validate;

/**
 * 留言验证器
 * Class AdminUser
 * @package app\admin\validate
 */
class Message extends Validate
{
    protected $rule = [
		'name'			=> 'require|chsAlpha|max:100',
		'tel'			=> 'length:7,14',
		'mobile'		=> 'mobile',
		'email'			=> 'email|max:60',
		'message'		=> 'max:250',
		'ip'			=> 'ip',
    ];

    protected $message = [
        'name.require'				=> '请输入您的称呼',
		'name.chsAlpha'				=> '称呼只能是汉字、字母',
		'name.max'					=> '称呼过长',
		
		'tel.length'				=> '电话号码应在7-14位',
		'mobile.mobile'				=> '手机号码不正确',
		'email.email'				=> '邮箱不正确',
		'email.max'					=> '邮箱过长',
		'message.max'				=> '留言内容过长',
		'ip.ip'						=> 'IP地址不正确',

    ];
	

}